<?php

use app\common\EventName;

// 事件定义文件
return [
    'bind' => [
    ],

    'listen' => [
        'AppInit'                         => [],
        'HttpRun'                         => [],
        'HttpEnd'                         => [],
        'LogLevel'                        => [],
        'LogWrite'                        => [],
        //支付同步回调
        EventName::PAY_CALLBACK           => [
            \app\listener\pay\PayCallbackListener::class,
        ],
        //支付成功
        EventName::PAY_SUCCESS            => [
            \app\listener\pay\PaySuccessOrderUpdateListener::class,
            \app\listener\pay\PaySuccessProductIncBuyTotalListener::class,
            \app\listener\pay\PaySuccessUserRechargeMoneyListener::class,
            \app\listener\pay\PaySuccessControlDeviceWaitListener::class,

            \app\listener\pay\PaySuccessServiceChargeListener::class,
            \app\listener\pay\PaySuccessUpdatePayAmountListener::class
        ],
        //撤销支付
        EventName::PAY_CANCEL             => [],
        //创建订单
        EventName::CREATE_ORDER           => [
            \app\listener\order\CreateOrderListener::class,
        ],
        //待退款
        EventName::ORDER_WAIT_REFUND      => [
            \app\listener\order\OrderWaitRefundListener::class
        ],
        //处理退款
        EventName::ORDER_REFUND           => [
            \app\listener\order\OrderRefundListener::class
        ],
        //退款成功
        EventName::ORDER_REFUND_SUCCESS   => [
            \app\listener\order\OrderRefundSuccessListener::class
        ],
        //退款失败
        EventName::ORDER_REFUND_ERROR     => [
            \app\listener\order\OrderRefundErrorListener::class
        ],

        //MQTT订阅
        EventName::MQTT_SUBSCRIBE_MSG     => [
            \app\listener\device\DeviceSubscribeMessageListener::class,
        ],

        //物业支付成功
        EventName::WUYE_PAY_SUCCESS            => [
            \app\listener\wuyePay\PaySuccessOrderUpdateListener::class,
            \app\listener\wuyePay\PaySuccessPayRecordUpdateListener::class,
        ],
        //定时任务
        EventName::CRONTAB_TASK            => [
            \app\listener\crmeb\TestCrmeb::class,
        ],
    ],

    'subscribe' => [
       
    ],
];
